import { createRouter, createWebHashHistory } from 'vue-router'

const Layout = () => import('@/views/Layout.vue')
const Home = () => import('@/views/home/index.vue')
const Category = () => import("@/views/category/index");
const Search = () => import("@/views/search/index");
const routes = [
  {
    path: '/',
    component: Layout,
    children: [
      { path: "/", component: Home },
      { path: "/category/:id", component: Category },
      { path: "/search", component: Search },
    ],
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
